{extend name="public/base"/}
{block name="body"}
<div class="main-box clearfix">
	<header class="main-box-header clearfix">
		<div class="pull-left">
			<h2>{:isset($info['id'])?'编辑':'新增'}后台菜单</h2>
		</div>
		<div class="pull-right"></div>
	</header>
	<div class="main-box-body clearfix">
		<form method="post" class="form form-horizontal">
			<div class="form-group">
				<label class="col-lg-2 control-label">标题</label>
				<div class="col-lg-10">
					<input type="text" class="form-control" name="title" value="{$info.title|default=''}" style="width: 80%">
					<span class="help-block">（用于后台显示的配置标题）</span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-lg-2 control-label">小图标</label>
				<div class="col-lg-10">
					<input type="text" class="form-control" name="icon" value="{$info.icon|default=''}" style="width: 80%">
					<span class="help-block">（用于显示在菜单左侧，不填则不显示）</span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-lg-2 control-label">排序</label>
				<div class="col-lg-10">
					<input type="text" class="form-control" name="sort" value="{$info.sort|default=0}" style="width: 60%">
					<span class="help-block">（用于分组显示的顺序）</span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-lg-2 control-label">链接</label>
				<div class="col-lg-10">
					<input type="text" class="form-control" name="url" value="{$info['url']|default=''}" style="width: 80%">
					<span class="help-block">（U函数解析的URL或者外链）</span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-lg-2 control-label">上级菜单</label>
				<div class="col-lg-10">
					<select name="pid" class="form-control" style="width: 50%">
						{volist name="Menus" id="menu"}
						<option value="{$menu['id']}" {if $info['pid'] == $menu['id']}selected{/if}>{$menu.title_show}</option>
						{/volist}
					</select>
					<span class="help-block">（所属的上级菜单）</span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-lg-2 control-label">分组</label>
				<div class="col-lg-10">
					<input type="text" class="form-control" name="group" value="{$info['group']|default=''}" style="width: 50%">
					<span class="help-block">（用于左侧分组二级菜单）</span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-lg-2 control-label">是否隐藏</label>
				<div class="col-lg-1">
					<select name="hide" class="form-control">
						<option value="0" >否</option>
						<option value="1" {if isset($info['hide']) && $info['hide']==1}selected{/if}>是
					</option>
				</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-lg-2 control-label">仅开发者模式可见</label>
				<div class="col-lg-1">
					<select name="is_dev" class="form-control">
						<option value="0" >否</option>
						<option value="1" {if isset($info['is_dev']) && $info['is_dev']==1}selected{/if}>是
					</option>
				</select>
			</div>
			</div>
			<div class="form-group">
				<label class="col-lg-2 control-label">说明</label>
				<div class="col-lg-10">
					<input type="text" class="form-control" name="tip" value="{$info.tip|default=''}" style="width: 60%;">
					<span class="help-block">（菜单详细说明）</span>
				</div>
			</div>

			<div class="form-group">
				<div class="col-lg-offset-2 col-lg-10">
					<input type="hidden" name="id" value="{$info['id']|default=''}">
					<button class="btn btn-success submit-btn ajax-post" type="submit" target-form="form-horizontal">确 定</button>
					<button class="btn btn-danger btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
				</div>
			</div>
		</form>
	</div>
</div>
{/block}